package com.lhy.controller;

import com.lhy.domain.Prescribe;
import com.lhy.service.PrescribeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @author 汪
 */
@Controller
public class PrescribeController {
    @Autowired
    PrescribeService prescribeService;
    @RequestMapping("/showAllPrescribe")
    public String showAllPrescribe(HttpServletRequest req){
        Integer roid = Integer.parseInt(req.getParameter("roid"));
        List<Prescribe> prescribes=prescribeService.findPrescribe(roid);
        HttpSession session=req.getSession();
        session.setAttribute("prescribes",prescribes);
        return "ypff";
    }
}
